Symbolic derivation qubit-cavity Hamiltonian

Based on: J. R. Johansson (robert@riken.jp), http://jrjohansson.github.io, and Eunjong Kim.

Setup modules


In [1]:
from sympy import *
init_printing()

In [2]:
from sympsi import *
from sympsi.boson import *
from sympsi.pauli import *

The Jaynes-Cummings model

The Jaynes-Cummings model is one of the most elementary quantum mechanical models light-matter interaction. It describes a single two-level atom that interacts with a single harmonic-oscillator mode of a electromagnetic cavity.

The Hamiltonian for a two-level system in its eigenbasis can be written as

$$ H = \frac{1}{2}\omega_q \sigma_z $$

and the Hamiltonian of a quantum harmonic oscillator (cavity) is

$$ H = \hbar\omega_r (a^\dagger a + 1/2) $$

The atom interacts with the electromagnetic field produced by the cavity mode $a + a^\dagger$ through its dipole moment. The dipole-transition operators is $\sigma_x$ (which cause a transition from the two dipole states of the atom). The combined atom-cavity Hamiltonian can therefore be written in the form

$$ H = \hbar\omega_r (a^\dagger a + 1/2) + \frac{1}{2}\hbar\Omega\sigma_z + \hbar g\sigma_x(a + a^\dagger) $$

Although the Jaynes-Cumming Hamiltonian allow us to evolve the given initial state according to the Schrödinger Equation, in an experiment we would like to predicte the response of the coupled cavity-qubit system under the influence of driving fields for the cavity and qubit, and also account for the effects of dissipation and dephasing (not treated here)

The external coherent-state input may be incorporated in the Jaynes-Cummings Hamiltonian by addition of terms involving the amplitude of the driving field $\vec{E_d} \left(\vec{E_s}\right)$ and it's frequency $\omega_d\left(\omega_s\right)$

$$ H_{cavity} = E_d \left(e^{i\omega_dt}a +e^{-i\omega_dt}\right) $$$$ H_{qubit} = E_s \left(e^{i\omega_st}a +e^{-i\omega_st}\right) $$

To obtain the Jaynes-Cumming Hamiltonian

$$ H = \hbar\omega_r (a^\dagger a + 1/2) %-\frac{1}{2}\Delta\sigma_x + \frac{1}{2}\hbar\Omega\sigma_z + \hbar g(\sigma_+ a + \sigma_- a^\dagger) $$

we also need to perform a rotating-wave approximation which simplifies the interaction part of the Hamiltonian. In the following we will begin with looking at how these two Hamiltonians are related.

To represent the atom-cavity Hamiltonian in SymPy we creates an instances of the operator classes BosonOp and SigmaX, SigmaY, and SigmaZ, and use these to construct the Hamiltonian (we work in units where $\hbar = 1$).


In [67]:
omega_r, omega_q, g, Delta_d, Delta_s, t, x, chi, Hsym = symbols("omega_r, omega_q, g, Delta_d, Delta_s, t, x, chi, H")
A, B = symbols("A,B") # Electric field amplitude
omega_d, omega_s = symbols("omega_d, omega_s")
Delta = symbols("Delta")

In [4]:
sx, sy, sz, sm, sp = SigmaX(), SigmaY(), SigmaZ(), SigmaMinus(), SigmaPlus()
a = BosonOp("a")

In [59]:
H = omega_r * Dagger(a) * a + omega_q/2 * sz 
H_int = g * sx * (a + Dagger(a))
H_drive_r = A * (exp(I*omega_d*t)*a + exp(-I*omega_d*t)*Dagger(a))
H_drive_q = B * (exp(I*omega_s*t)*sm + exp(-I*omega_d*t)*sp)
H_total =  H+ H_drive_r + H_drive_q+ H_int
Eq(Hsym, H+ H_drive_r + H_drive_q+ H_int)


Out[59]:
$$H = A \left(e^{i \omega_{d} t} {a} + e^{- i \omega_{d} t} {{a}^\dagger}\right) + B \left(e^{i \omega_{s} t} {\sigma_-} + e^{- i \omega_{d} t} {\sigma_+}\right) + g {\sigma_x} \left({{a}^\dagger} + {a}\right) + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a}$$

Unitary transformation to interaction picture


In [60]:
U = exp(I  * omega_r * t * Dagger(a)*a)
U


Out[60]:
$$e^{i \omega_{r} t {{a}^\dagger} {a}}$$

In [61]:
H1 = hamiltonian_transformation(U, H_total.expand())

H1


Out[61]:
$$A e^{i \omega_{d} t} e^{- i \omega_{r} t} {a} + A e^{- i \omega_{d} t} e^{i \omega_{r} t} {{a}^\dagger} + B e^{i \omega_{s} t} {\sigma_-} + B e^{- i \omega_{d} t} {\sigma_+} + g e^{i \omega_{r} t} {\sigma_x} {{a}^\dagger} + g e^{- i \omega_{r} t} {\sigma_x} {a} + \frac{\omega_{q} {\sigma_z}}{2}$$

In [63]:
U = exp(I * omega_q * t * sp * sm)

U


Out[63]:
$$e^{i \omega_{q} t {\sigma_+} {\sigma_-}}$$

In [64]:
H2 = hamiltonian_transformation(U, H1.expand())

H2 = H2.subs(sx, sm + sp).expand()

H2 = powsimp(H2)

H2


Out[64]:
$$A e^{- i \omega_{d} t + i \omega_{r} t} {{a}^\dagger} + A e^{i \omega_{d} t - i \omega_{r} t} {a} + B e^{- i \omega_{d} t + i \omega_{q} t} {\sigma_+} + B e^{- i \omega_{q} t + i \omega_{s} t} {\sigma_-} + g e^{- i \omega_{q} t - i \omega_{r} t} {\sigma_-} {a} + g e^{- i \omega_{q} t + i \omega_{r} t} {\sigma_-} {{a}^\dagger} + g e^{i \omega_{q} t - i \omega_{r} t} {\sigma_+} {a} + g e^{i \omega_{q} t + i \omega_{r} t} {\sigma_+} {{a}^\dagger} - \frac{\omega_{q}}{2} \left(1 + {\sigma_z}\right) + \frac{\omega_{q} {\sigma_z}}{2}$$

In [65]:
# trick to simplify exponents
def simplify_exp(e):
    if isinstance(e, exp):
        return exp(simplify(e.exp.expand()))

    if isinstance(e, (Add, Mul)):
        return type(e)(*(simplify_exp(arg) for arg in e.args)) 

    return e

In [68]:
H3 = simplify_exp(H2).subs(-omega_r + omega_q, Delta)

H3


Out[68]:
$$A e^{i t \left(- \omega_{d} + \omega_{r}\right)} {{a}^\dagger} + A e^{i t \left(\omega_{d} - \omega_{r}\right)} {a} + B e^{i t \left(- \omega_{d} + \omega_{q}\right)} {\sigma_+} + B e^{i t \left(- \omega_{q} + \omega_{s}\right)} {\sigma_-} + g e^{i \Delta t} {\sigma_+} {a} + g e^{i t \left(\omega_{q} + \omega_{r}\right)} {\sigma_+} {{a}^\dagger} + g e^{- i t \left(\omega_{q} + \omega_{r}\right)} {\sigma_-} {a} + g e^{- i \Delta t} {\sigma_-} {{a}^\dagger} - \frac{\omega_{q}}{2} \left(1 + {\sigma_z}\right) + \frac{\omega_{q} {\sigma_z}}{2}$$

Now, in the rotating-wave approximation we can drop the fast oscillating terms containing the factors $e^{\pm i(\omega_q + \omega_r)t}$


In [71]:
H4 = drop_terms_containing(H3, [exp( I * (omega_q + omega_r) * t),
                                exp(-I * (omega_q + omega_r) * t)])

H4 = drop_c_number_terms(H4.expand())

Eq(Hsym, H4)


Out[71]:
$$H = A e^{i \omega_{d} t} e^{- i \omega_{r} t} {a} + A e^{- i \omega_{d} t} e^{i \omega_{r} t} {{a}^\dagger} + B e^{- i \omega_{q} t} e^{i \omega_{s} t} {\sigma_-} + B e^{- i \omega_{d} t} e^{i \omega_{q} t} {\sigma_+} + g e^{i \Delta t} {\sigma_+} {a} + g e^{- i \Delta t} {\sigma_-} {{a}^\dagger}$$

This is the interaction term of in the Jaynes-Cumming model in the interaction picture. If we transform back to the Schrödinger picture we have:


In [72]:
U = exp(-I * omega_r * t * Dagger(a) * a)
H5 = hamiltonian_transformation(U, H4.expand())
H5


Out[72]:
$$A e^{i \omega_{d} t} {a} + A e^{- i \omega_{d} t} {{a}^\dagger} + B e^{- i \omega_{q} t} e^{i \omega_{s} t} {\sigma_-} + B e^{- i \omega_{d} t} e^{i \omega_{q} t} {\sigma_+} + g e^{i \Delta t} e^{i \omega_{r} t} {\sigma_+} {a} + g e^{- i \Delta t} e^{- i \omega_{r} t} {\sigma_-} {{a}^\dagger} + \omega_{r} {{a}^\dagger} {a}$$

In [73]:
U = exp(-I * omega_q * t * sp * sm)
H6 = hamiltonian_transformation(U, H5.expand())
H6


Out[73]:
$$A e^{i \omega_{d} t} {a} + A e^{- i \omega_{d} t} {{a}^\dagger} + B e^{i \omega_{s} t} {\sigma_-} + B e^{- i \omega_{d} t} {\sigma_+} + g e^{i \Delta t} e^{- i \omega_{q} t} e^{i \omega_{r} t} {\sigma_+} {a} + g e^{- i \Delta t} e^{i \omega_{q} t} e^{- i \omega_{r} t} {\sigma_-} {{a}^\dagger} + \omega_{q} {\sigma_+} {\sigma_-} + \omega_{r} {{a}^\dagger} {a}$$

In [76]:
H7 = simplify_exp(H6).subs(Delta, omega_q - omega_r)
H7 = simplify_exp(powsimp(H7)).expand()

H7 = drop_c_number_terms(H7)

H = collect(H7, [A,B,g])

Eq(Hsym, H)


Out[76]:
$$H = A \left(e^{i \omega_{d} t} {a} + e^{- i \omega_{d} t} {{a}^\dagger}\right) + B \left(e^{i \omega_{s} t} {\sigma_-} + e^{- i \omega_{d} t} {\sigma_+}\right) + g \left({\sigma_-} {{a}^\dagger} + {\sigma_+} {a}\right) + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a}$$

Linearized interaction

First we apply the unitary transformation $U = e^{i \omega_d a^\dagger a t}$:


In [77]:
U = exp(I * Dagger(a) * a * omega_d * t)

U


Out[77]:
$$e^{i \omega_{d} t {{a}^\dagger} {a}}$$

In [78]:
H1 = hamiltonian_transformation(U, H, independent=True)

H1


Out[78]:
$$A \left({{a}^\dagger} + {a}\right) + B \left(e^{i \omega_{s} t} {\sigma_-} + e^{- i \omega_{d} t} {\sigma_+}\right) + g \left(e^{i \omega_{d} t} {\sigma_-} {{a}^\dagger} + e^{- i \omega_{d} t} {\sigma_+} {a}\right) - \omega_{d} {{a}^\dagger} {a} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a}$$

We can now perform a rotating-wave approximation (RWA) by eliminating all terms that rotate with frequencies $2\omega_d$:


In [79]:
H2 = drop_terms_containing(H1.expand(), [exp(-2*I*omega_d*t), exp(2*I*omega_d*t)])

Eq(Symbol("H_{rwa}"), H2)


Out[79]:
$$H_{{rwa}} = A {{a}^\dagger} + A {a} + B e^{i \omega_{s} t} {\sigma_-} + B e^{- i \omega_{d} t} {\sigma_+} + g e^{i \omega_{d} t} {\sigma_-} {{a}^\dagger} + g e^{- i \omega_{d} t} {\sigma_+} {a} - \omega_{d} {{a}^\dagger} {a} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a}$$

Introduce the detuning $\Delta_d = \omega_r - \omega_d$:


In [81]:
H3 = H2.subs(omega_r, Delta_d + omega_d).expand()

H3


Out[81]:
$$A {{a}^\dagger} + A {a} + B e^{i \omega_{s} t} {\sigma_-} + B e^{- i \omega_{d} t} {\sigma_+} + \Delta_{d} {{a}^\dagger} {a} + g e^{i \omega_{d} t} {\sigma_-} {{a}^\dagger} + g e^{- i \omega_{d} t} {\sigma_+} {a} + \frac{\omega_{q} {\sigma_z}}{2}$$

Second we apply the unitary transformation $U = e^{i \omega_s \sigma_+ \sigma_- t}$:


In [82]:
U = exp(I * sp*sm* omega_d * t)

U


Out[82]:
$$e^{i \omega_{d} t {\sigma_+} {\sigma_-}}$$

In [83]:
H4 = hamiltonian_transformation(U, H3, independent=True)

H4


Out[83]:
$$A {{a}^\dagger} + A {a} + B {\sigma_+} + B e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_-} + \Delta_{d} {{a}^\dagger} {a} + g {\sigma_-} {{a}^\dagger} + g {\sigma_+} {a} - \omega_{d} {\sigma_+} {\sigma_-} + \frac{\omega_{q} {\sigma_z}}{2}$$

In [ ]:


In [ ]:


In [ ]:

Introduce the detuning $\Delta_s = \omega_q - \omega_s$:


In [85]:
H5 = H4.subs(omega_q, Delta_s + omega_s).expand()

H5


Out[85]:
$$A {{a}^\dagger} + A {a} + B {\sigma_+} + B e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_-} + \Delta_{d} {{a}^\dagger} {a} + \frac{\Delta_{s} {\sigma_z}}{2} + g {\sigma_-} {{a}^\dagger} + g {\sigma_+} {a} - \omega_{d} {\sigma_+} {\sigma_-} + \frac{\omega_{s} {\sigma_z}}{2}$$

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:

Substitute $ \sigma_x = \sigma_+ + \sigma_-$


In [38]:
H1 = H_total.subs(sx, sm + sp).expand()
H1


Out[38]:
$$A e^{i \omega_{d} t} {a} + A e^{- i \omega_{d} t} {{a}^\dagger} + B e^{i \omega_{s} t} {\sigma_-} + B e^{- i \omega_{d} t} {\sigma_+} + g {\sigma_-} {{a}^\dagger} + g {\sigma_-} {a} + g {\sigma_+} {{a}^\dagger} + g {\sigma_+} {a} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a}$$

In [39]:
U = exp(I * omega_d * t * (Dagger(a) * a) + I * omega_s * t * (sp * sm))

U.expand()


Out[39]:
$$e^{i \omega_{d} t {{a}^\dagger} {a} + \frac{i \omega_{s}}{2} t + \frac{i \omega_{s}}{2} t {\sigma_z}}$$

In [40]:
H2 = hamiltonian_transformation(U, H1.expand())

H2


Out[40]:
$$A {{a}^\dagger} + A {a} + B {\sigma_-} + B e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_+} + g e^{i \omega_{d} t} e^{i \omega_{s} t} {\sigma_+} {{a}^\dagger} + g e^{i \omega_{d} t} e^{- i \omega_{s} t} {\sigma_-} {{a}^\dagger} + g e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_+} {a} + g e^{- i \omega_{d} t} e^{- i \omega_{s} t} {\sigma_-} {a} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a} - i \left(- i \omega_{d} {{a}^\dagger} {a} - \frac{i \omega_{s}}{2} \left(1 + {\sigma_z}\right)\right)$$

In [41]:
H2a = powsimp(H2)
H2a


Out[41]:
$$A {{a}^\dagger} + A {a} + B e^{- i \omega_{d} t + i \omega_{s} t} {\sigma_+} + B {\sigma_-} + g e^{- i \omega_{d} t - i \omega_{s} t} {\sigma_-} {a} + g e^{- i \omega_{d} t + i \omega_{s} t} {\sigma_+} {a} + g e^{i \omega_{d} t - i \omega_{s} t} {\sigma_-} {{a}^\dagger} + g e^{i \omega_{d} t + i \omega_{s} t} {\sigma_+} {{a}^\dagger} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a} - i \left(- i \omega_{d} {{a}^\dagger} {a} - \frac{i \omega_{s}}{2} \left(1 + {\sigma_z}\right)\right)$$

In [42]:
# trick to simplify exponents
def simplify_exp(e):
    if isinstance(e, exp):
        return exp(simplify(e.exp.expand()))

    if isinstance(e, (Add, Mul)):
        return type(e)(*(simplify_exp(arg) for arg in e.args)) 

    return e

In [43]:
F = symbols("F")
H2b = simplify_exp(H2a).subs(omega_d+omega_s,F)
H2b


Out[43]:
$$A {{a}^\dagger} + A {a} + B e^{i t \left(- \omega_{d} + \omega_{s}\right)} {\sigma_+} + B {\sigma_-} + g e^{i F t} {\sigma_+} {{a}^\dagger} + g e^{i t \left(- \omega_{d} + \omega_{s}\right)} {\sigma_+} {a} + g e^{i t \left(\omega_{d} - \omega_{s}\right)} {\sigma_-} {{a}^\dagger} + g e^{- i F t} {\sigma_-} {a} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a} - i \left(- i \omega_{d} {{a}^\dagger} {a} - \frac{i \omega_{s}}{2} \left(1 + {\sigma_z}\right)\right)$$

Now, in the rotating-wave approximation we can drop the fast oscillating terms containing the factors $e^{\pm i(\omega_d + \omega_s)t}$


In [50]:
H2c = H2b.expand()
H2c
H2d= H2c.collect([Dagger(a)*a,sz,g])
H2d


Out[50]:
$$A {{a}^\dagger} + A {a} + B {\sigma_-} + B e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_+} + g \left(e^{i F t} {\sigma_+} {{a}^\dagger} + e^{i \omega_{d} t} e^{- i \omega_{s} t} {\sigma_-} {{a}^\dagger} + e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_+} {a} + e^{- i F t} {\sigma_-} {a}\right) - \frac{\omega_{s}}{2} + \left(- \omega_{d} + \omega_{r}\right) {{a}^\dagger} {a} + \left(\frac{\omega_{q}}{2} - \frac{\omega_{s}}{2}\right) {\sigma_z}$$

In [51]:
H2e = H2d.subs(-omega_d+omega_r,Delta_d)
H2e


Out[51]:
$$A {{a}^\dagger} + A {a} + B {\sigma_-} + B e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_+} + \Delta_{d} {{a}^\dagger} {a} + g \left(e^{i F t} {\sigma_+} {{a}^\dagger} + e^{i \omega_{d} t} e^{- i \omega_{s} t} {\sigma_-} {{a}^\dagger} + e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_+} {a} + e^{- i F t} {\sigma_-} {a}\right) - \frac{\omega_{s}}{2} + \left(\frac{\omega_{q}}{2} - \frac{\omega_{s}}{2}\right) {\sigma_z}$$

In [53]:
H2f = H2e.subs(omega_q/2 - omega_s/2, Delta_s/2)
H2f


Out[53]:
$$A {{a}^\dagger} + A {a} + B {\sigma_-} + B e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_+} + \Delta_{d} {{a}^\dagger} {a} + \frac{\Delta_{s} {\sigma_z}}{2} + g \left(e^{i F t} {\sigma_+} {{a}^\dagger} + e^{i \omega_{d} t} e^{- i \omega_{s} t} {\sigma_-} {{a}^\dagger} + e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_+} {a} + e^{- i F t} {\sigma_-} {a}\right) - \frac{\omega_{s}}{2}$$

In [55]:
H2g = H2f.expand()
H3 = drop_terms_containing(H2g, [exp( I * (F) * t),
                                exp(-I * (F) * t)])

H3 = drop_c_number_terms(H3.expand())

Eq(Hsym, H3)


Out[55]:
$$H = A {{a}^\dagger} + A {a} + B {\sigma_-} + B e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_+} + \Delta_{d} {{a}^\dagger} {a} + \frac{\Delta_{s} {\sigma_z}}{2} + g e^{i \omega_{d} t} e^{- i \omega_{s} t} {\sigma_-} {{a}^\dagger} + g e^{- i \omega_{d} t} e^{i \omega_{s} t} {\sigma_+} {a}$$

In [55]:

This is the interaction term of in the Jaynes-Cumming model in the interaction picture. If we transform back to the Schrödinger picture we have:


In [56]:
U = exp(-I * omega_d * t * Dagger(a) * a - I * omega_s * t * sp*sm)


H4 = hamiltonian_transformation(U, H3.expand())
H4


Out[56]:
$$A e^{i \omega_{d} t} {a} + A e^{- i \omega_{d} t} {{a}^\dagger} + B e^{i \omega_{s} t} {\sigma_-} + B e^{- i \omega_{d} t} {\sigma_+} + \Delta_{d} {{a}^\dagger} {a} + \frac{\Delta_{s} {\sigma_z}}{2} + g {\sigma_-} {{a}^\dagger} + g {\sigma_+} {a} - i \left(i \omega_{d} {{a}^\dagger} {a} + i \omega_{s} {\sigma_+} {\sigma_-}\right)$$

In [57]:
H4a = H4.expand()
H4a


Out[57]:
$$A e^{i \omega_{d} t} {a} + A e^{- i \omega_{d} t} {{a}^\dagger} + B e^{i \omega_{s} t} {\sigma_-} + B e^{- i \omega_{d} t} {\sigma_+} + \Delta_{d} {{a}^\dagger} {a} + \frac{\Delta_{s} {\sigma_z}}{2} + g {\sigma_-} {{a}^\dagger} + g {\sigma_+} {a} + \omega_{d} {{a}^\dagger} {a} + \omega_{s} {\sigma_+} {\sigma_-}$$

In [58]:
H4b = collect(H4a, [Dagger(a)*a,sz,g, A, B])
H4b


Out[58]:
$$A \left(e^{i \omega_{d} t} {a} + e^{- i \omega_{d} t} {{a}^\dagger}\right) + B \left(e^{i \omega_{s} t} {\sigma_-} + e^{- i \omega_{d} t} {\sigma_+}\right) + \frac{\Delta_{s} {\sigma_z}}{2} + g \left({\sigma_-} {{a}^\dagger} + {\sigma_+} {a}\right) + \omega_{s} {\sigma_+} {\sigma_-} + \left(\Delta_{d} + \omega_{d}\right) {{a}^\dagger} {a}$$

In [30]:



Out[30]:
$$A \left(e^{i \omega_{d} t} {a} + e^{- i \omega_{d} t} {{a}^\dagger}\right) + B \left(e^{i \omega_{s} t} {\sigma_-} + e^{- i \omega_{d} t} {\sigma_+}\right) + g \left({\sigma_-} {{a}^\dagger} + {\sigma_+} {a}\right) + \omega_{r} {{a}^\dagger} {a} + \omega_{s} {\sigma_+} {\sigma_-} + \left(\frac{\omega_{q}}{2} - \frac{\omega_{s}}{2}\right) {\sigma_z}$$

In [ ]:


In [26]:
H6a = collect(H6, [Dagger(a)*a,sz,g ]);H6a


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-26-85299ff222f4> in <module>()
----> 1 H6a = collect(H6, [Dagger(a)*a,sz,g ]);H6a

NameError: name 'H6' is not defined

In [55]:
H6b = powsimp(H6a)
H5 = drop_terms_containing(H6b, [exp( I * (omega_s) * t),
                                exp(-I * (omega_s) * t)])

H5 = drop_c_number_terms(H5.expand())

H5


Out[55]:
$$- \frac{g \omega_{s}^{5}}{480} t^{5} {\sigma_y} {{a}^\dagger} - \frac{g \omega_{s}^{5}}{480} t^{5} {\sigma_y} {a} + \frac{i g}{96} \omega_{s}^{4} t^{4} {\sigma_y} {{a}^\dagger} + \frac{i g}{96} \omega_{s}^{4} t^{4} {\sigma_y} {a} + \frac{g \omega_{s}^{3}}{24} t^{3} {\sigma_y} {{a}^\dagger} + \frac{g \omega_{s}^{3}}{24} t^{3} {\sigma_y} {a} - \frac{i g}{8} \omega_{s}^{2} t^{2} {\sigma_y} {{a}^\dagger} - \frac{i g}{8} \omega_{s}^{2} t^{2} {\sigma_y} {a} - \frac{g \omega_{s}}{4} t {\sigma_y} {{a}^\dagger} - \frac{g \omega_{s}}{4} t {\sigma_y} {a} - \frac{g {\sigma_x}}{4} e^{i \omega_{s} t} {{a}^\dagger} - \frac{g {\sigma_x}}{4} e^{i \omega_{s} t} {a} + \frac{g {\sigma_+}}{2} {{a}^\dagger} + \frac{g {\sigma_+}}{2} {a} + \frac{g {\sigma_x}}{4} {{a}^\dagger} + \frac{g {\sigma_x}}{4} {a} + \frac{i g}{2} {\sigma_y} {{a}^\dagger} + \frac{i g}{2} {\sigma_y} {a} + \frac{g {\sigma_+}}{2} e^{- i \omega_{s} t} {{a}^\dagger} + \frac{g {\sigma_+}}{2} e^{- i \omega_{s} t} {a} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a}$$

In [57]:
H4 = drop_terms_containing(H5, [t**5, t**4,t**3,t**2,t])

H5 = drop_c_number_terms(H4.expand())

# Eq(Hsym, H5)H
H5


Out[57]:
$$- \frac{g {\sigma_x}}{4} e^{i \omega_{s} t} {{a}^\dagger} - \frac{g {\sigma_x}}{4} e^{i \omega_{s} t} {a} + \frac{g {\sigma_+}}{2} {{a}^\dagger} + \frac{g {\sigma_+}}{2} {a} + \frac{g {\sigma_x}}{4} {{a}^\dagger} + \frac{g {\sigma_x}}{4} {a} + \frac{i g}{2} {\sigma_y} {{a}^\dagger} + \frac{i g}{2} {\sigma_y} {a} + \frac{g {\sigma_+}}{2} e^{- i \omega_{s} t} {{a}^\dagger} + \frac{g {\sigma_+}}{2} e^{- i \omega_{s} t} {a} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a}$$

In [58]:
H = collect(H5, [Dagger(a)*a,sx, g])

Eq(Hsym, H)


Out[58]:
$$H = g \left(\frac{{\sigma_+} {{a}^\dagger}}{2} + \frac{{\sigma_+} {a}}{2} + \frac{i {\sigma_y}}{2} {{a}^\dagger} + \frac{i {\sigma_y}}{2} {a} + \frac{{\sigma_+} {{a}^\dagger}}{2} e^{- i \omega_{s} t} + \frac{{\sigma_+} {a}}{2} e^{- i \omega_{s} t}\right) + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a} + {\sigma_x} \left(- \frac{g {{a}^\dagger}}{4} e^{i \omega_{s} t} - \frac{g {a}}{4} e^{i \omega_{s} t} + \frac{g {{a}^\dagger}}{4} + \frac{g {a}}{4}\right)$$

This is the Jaynes-Cumming model give above, and we have now seen that it is obtained to the dipole interaction Hamiltonian through the rotating wave approximation.

Dispersive regime

In the dispersive regime, where the two-level system is detuned from the cavity by much more than the interaction strength, $\Delta \gg g$, an effective Hamiltonian can be dervied which describes the Stark shift of the two-level system (which depends on the number of photons in the cavity) and the frequency shift of the cavity (which depend on the state of the two-level system).

This effective Hamiltonian, which is correct up to second order in the small paramter $g/\Delta$, is obtained by performing the unitary transformation

$$ U = e^{\frac{g}{\Delta}(a \sigma_- - a^\dagger \sigma_+)} $$

In [20]:
U = exp((x * (a * sp - Dagger(a) * sm)).expand())

U


Out[20]:
$$e^{- x {{a}^\dagger} {\sigma_-} + x {a} {\sigma_+}}$$

In [21]:
#H1 = unitary_transformation(U, H, allinone=True, expansion_search=False, N=3).expand()
#H1 = qsimplify(H1)
#H1

In [22]:
H1 = hamiltonian_transformation(U, H, expansion_search=False, N=3).expand()

H1 = qsimplify(H1)

H1


Out[22]:
$$- \frac{\Omega x^{2}}{2} - \Omega x^{2} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega x^{2}}{2} {\sigma_z} - \Omega x {{a}^\dagger} {\sigma_-} - \Omega x {a} {\sigma_+} + \frac{\Omega {\sigma_z}}{2} + g x^{4} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{3 g}{4} x^{4} {{a}^\dagger} {\sigma_-} - g x^{4} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} + \frac{5 g}{4} x^{4} {a} {\sigma_+} - 2 g x^{2} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - 2 g x^{2} {{a}^\dagger} {\sigma_-} - 2 g x^{2} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - 2 g x^{2} {a} {\sigma_+} + g x + 2 g x {{a}^\dagger} {a} {\sigma_z} + g x {\sigma_z} + g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \frac{\omega_{r} x^{4}}{4} {{a}^\dagger} {a} - \frac{\omega_{r} x^{3}}{2} {{a}^\dagger} {\sigma_-} - \frac{\omega_{r} x^{3}}{2} {a} {\sigma_+} + \frac{\omega_{r} x^{2}}{2} + \omega_{r} x^{2} {{a}^\dagger} {a} {\sigma_z} + \frac{\omega_{r} x^{2}}{2} {\sigma_z} + \omega_{r} x {{a}^\dagger} {\sigma_-} + \omega_{r} x {a} {\sigma_+} + \omega_{r} {{a}^\dagger} {a}$$

In [23]:
H2 = drop_terms_containing(H1.expand(), [x**3, x**4])

H2


Out[23]:
$$- \frac{\Omega x^{2}}{2} - \Omega x^{2} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega x^{2}}{2} {\sigma_z} - \Omega x {{a}^\dagger} {\sigma_-} - \Omega x {a} {\sigma_+} + \frac{\Omega {\sigma_z}}{2} - 2 g x^{2} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - 2 g x^{2} {{a}^\dagger} {\sigma_-} - 2 g x^{2} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - 2 g x^{2} {a} {\sigma_+} + g x + 2 g x {{a}^\dagger} {a} {\sigma_z} + g x {\sigma_z} + g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \frac{\omega_{r} x^{2}}{2} + \omega_{r} x^{2} {{a}^\dagger} {a} {\sigma_z} + \frac{\omega_{r} x^{2}}{2} {\sigma_z} + \omega_{r} x {{a}^\dagger} {\sigma_-} + \omega_{r} x {a} {\sigma_+} + \omega_{r} {{a}^\dagger} {a}$$

In [24]:
H3 = H2.subs(x, g/Delta)

H3


Out[24]:
$$\frac{\Omega {\sigma_z}}{2} + g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \omega_{r} {{a}^\dagger} {a} - \frac{\Omega g}{\Delta} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} {a} {\sigma_+} + \frac{g^{2}}{\Delta} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} + \frac{g \omega_{r}}{\Delta} {{a}^\dagger} {\sigma_-} + \frac{g \omega_{r}}{\Delta} {a} {\sigma_+} - \frac{\Omega g^{2}}{2 \Delta^{2}} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} {a} {\sigma_+} + \frac{g^{2} \omega_{r}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$

In [25]:
H4 = drop_c_number_terms(H3)

H4


Out[25]:
$$\frac{\Omega {\sigma_z}}{2} + g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \omega_{r} {{a}^\dagger} {a} - \frac{\Omega g}{\Delta} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} {a} {\sigma_+} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} + \frac{g \omega_{r}}{\Delta} {{a}^\dagger} {\sigma_-} + \frac{g \omega_{r}}{\Delta} {a} {\sigma_+} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} {a} {\sigma_+} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$

In [26]:
H5 = collect(H4, [Dagger(a) * a, sz])

H5


Out[26]:
$$g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \left(\frac{\Omega}{2} + \frac{g^{2}}{\Delta} - \frac{\Omega g^{2}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{2 \Delta^{2}}\right) {\sigma_z} + {{a}^\dagger} {a} \left(\omega_{r} + \frac{2 g^{2}}{\Delta} {\sigma_z} - \frac{\Omega g^{2}}{\Delta^{2}} {\sigma_z} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {\sigma_z}\right) - \frac{\Omega g}{\Delta} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} {a} {\sigma_+} + \frac{g \omega_{r}}{\Delta} {{a}^\dagger} {\sigma_-} + \frac{g \omega_{r}}{\Delta} {a} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} {a} {\sigma_+}$$

Now move to a frame co-rotating with the qubit and oscillator frequencies:


In [27]:
H5.expand()


Out[27]:
$$\frac{\Omega {\sigma_z}}{2} + g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \omega_{r} {{a}^\dagger} {a} - \frac{\Omega g}{\Delta} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} {a} {\sigma_+} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} + \frac{g \omega_{r}}{\Delta} {{a}^\dagger} {\sigma_-} + \frac{g \omega_{r}}{\Delta} {a} {\sigma_+} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} {a} {\sigma_+} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$

In [28]:
U = exp(I * omega_r * t * Dagger(a) * a)

In [29]:
H6 = hamiltonian_transformation(U, H5.expand()); H6


Out[29]:
$$\frac{\Omega {\sigma_z}}{2} + g e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} + g e^{- i \omega_{r} t} {a} {\sigma_+} - \frac{\Omega g}{\Delta} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} e^{- i \omega_{r} t} {a} {\sigma_+} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} + \frac{g \omega_{r}}{\Delta} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} + \frac{g \omega_{r}}{\Delta} e^{- i \omega_{r} t} {a} {\sigma_+} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} - \frac{2 g^{3}}{\Delta^{2}} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} e^{i \omega_{r} t} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} e^{- i \omega_{r} t} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} e^{- i \omega_{r} t} {a} {\sigma_+} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$

In [30]:
U = exp(I * Omega * t * Dagger(sm) * sm)

In [31]:
H7 = hamiltonian_transformation(U, H6.expand()); H7


Out[31]:
$$- \Omega {\sigma_+} {\sigma_-} + \frac{\Omega {\sigma_z}}{2} + g e^{i \Omega t} e^{- i \omega_{r} t} {a} {\sigma_+} + g e^{- i \Omega t} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} e^{i \Omega t} e^{- i \omega_{r} t} {a} {\sigma_+} - \frac{\Omega g}{\Delta} e^{- i \Omega t} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} + \frac{g \omega_{r}}{\Delta} e^{i \Omega t} e^{- i \omega_{r} t} {a} {\sigma_+} + \frac{g \omega_{r}}{\Delta} e^{- i \Omega t} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} - \frac{2 g^{3}}{\Delta^{2}} e^{i \Omega t} e^{- i \omega_{r} t} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} e^{i \Omega t} e^{- i \omega_{r} t} {a} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} e^{- i \Omega t} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} e^{- i \Omega t} e^{i \omega_{r} t} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$

Now, since we are in the dispersive regime $|\Omega-\omega_r| \gg g$, we can do a rotating-wave approximation and drop all the fast rotating terms in the Hamiltonian above:


In [32]:
H8 = drop_terms_containing(H7, [exp(I * omega_r * t), exp(-I * omega_r * t),
                                exp(I * Omega * t), exp(-I * Omega * t)])

H8


Out[32]:
$$- \Omega {\sigma_+} {\sigma_-} + \frac{\Omega {\sigma_z}}{2} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$

In [33]:
H9 = qsimplify(H8)

H9 = collect(H9, [Dagger(a) * a, sz])

H9


Out[33]:
$$- \frac{\Omega}{2} + \left(\frac{g^{2}}{\Delta} - \frac{\Omega g^{2}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{2 \Delta^{2}}\right) {\sigma_z} + {{a}^\dagger} {a} \left(\frac{2 g^{2}}{\Delta} {\sigma_z} - \frac{\Omega g^{2}}{\Delta^{2}} {\sigma_z} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {\sigma_z}\right)$$

Now move back to the lab frame:


In [34]:
U = exp(-I * omega_r * t * Dagger(a) * a)

In [35]:
H10 = hamiltonian_transformation(U, H9.expand()); H10


Out[35]:
$$- \frac{\Omega}{2} + \omega_{r} {{a}^\dagger} {a} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$

In [36]:
U = exp(-I * Omega * t * Dagger(sm) * sm)

In [37]:
H11 = hamiltonian_transformation(U, H10.expand()); H11


Out[37]:
$$- \frac{\Omega}{2} + \Omega {\sigma_+} {\sigma_-} + \omega_{r} {{a}^\dagger} {a} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$

In [38]:
H12 = qsimplify(H11)

H12 = collect(H12, [Dagger(a) * a, sz])

H12 = H12.subs(omega_r, Omega-Delta).expand().collect([Dagger(a)*a, sz]).subs(Omega-Delta,omega_r)

Eq(Hsym, H12)


Out[38]:
$$H = \left(\frac{\Omega}{2} + \frac{g^{2}}{2 \Delta}\right) {\sigma_z} + {{a}^\dagger} {a} \left(\omega_{r} + \frac{g^{2} {\sigma_z}}{\Delta}\right)$$

This is the Hamiltonian of the Jaynes-Cummings model in the the dispersive regime. It can be interpreted as the resonator having a qubit-state-dependent frequency shift, or alternatively that the qubit is feeling a resonator-photon-number dependent Stark-shift.

Versions


In [35]:
%reload_ext version_information

%version_information sympy, sympsi


Out[35]:
SoftwareVersion
Python3.4.1 (default, Sep 20 2014, 19:44:17) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]
IPython2.1.0
OSDarwin 13.4.0 x86_64 i386 64bit
sympy0.7.5-git
sympsi0.1.0.dev-9060485
Thu Oct 09 16:25:51 2014 JST